home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex3.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  455 b   |  17 lines

  1. Program Example3;
  2.  
  3. { Program to demonstrate the Append function. }
  4.  
  5. Var f : text;
  6.  
  7. begin
  8.   Assign (f,'test.txt');
  9.   Rewrite (f);            { file is opened for write, and emptied }
  10.   Writeln (F,'This is the first line of text.txt');
  11.   close (f);
  12.   Append(f);              { file is opened for write, but NOT emptied. 
  13.                             any text written to it is appended.}
  14.   Writeln (f,'This is the second line of text.txt');
  15.   close (f);
  16. end.
  17.